<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ajax文件上传</title>
</head>
<body>
<form action="4.php" method="post" name="pic" enctype="multipart/form-data" target="frm">
    <p>
        <input type="file" name="pic" value="">
    </p>
    <p>
        <input type="submit" value="提交">
    </p>
</form>
<iframe src="4.php" frameborder="0" name="frm"></iframe>
</body>
</html>